var Wall = Class.extend({
	x0:null,
	y0:null,
	x1:null,
	y1:null,
	
	init: function(config)
	{
		this.x0 = config.x0 || 0;
		this.x1 = config.x1 || 0;
		this.y0 = config.y0 || 0;
		this.y1 = config.y1 || 0;
	},
	
	getLength: function()
	{
		var a = this.x1 - this.x0;
		var b = this.y1 - this.y0;
		return Math.sqrt(a * a + b * b);
	},
	getMiddleX: function()
	{
		return ((this.x1+this.x0)/2);
	},
	getMiddleY: function()
	{
		return ((this.y1+this.y0)/2);
	},
	getAngle: function()
	{
		return Math.atan2(this.y1-this.y0,this.x1-this.x0);
	}
});